import request from '@/utils/request'

export const regAPI = obj => {
  return request.post('/api/reg', obj)
}

export const loginAPI = obj => {
  return request.post('/api/login', obj)
}

export const getUserAPI = () => {
  return request.get('/my/userinfo')
}

export const updataUserAPI = obj => {
  return request.put('/my/userinfo', obj)
}

export const updataPwdAPI = obj => {
  return request.patch('/my/updatepwd', obj)
}

export const upImgAPI = val => {
  return request.patch('/my/update/avatar', { avatar: val })
}
